#include<stdio.h>
#include<assert.h>
#include<string.h>
void reverse(char* left, char* right)
{
	assert(left != NULL);
	assert(right!= NULL);
	while (left < right)
	{
		
		char temp = *left;
		*left = *right;
		*right = temp;
		left++;
		right--;
	}
}
//void left_move(char* arr, int k)
//{
//	int len = strlen(arr);
//	assert(arr != NULL);
//	reverse(arr,arr+k-1);
//	reverse(arr + k, arr + len-1);
//	reverse(arr, arr + len-1);
//}

int main()
{
	char arr[] = "abcdef";
	int len = strlen(arr);
	/*left_move(arr,2);*/
	reverse(arr, arr + len - 1);
	printf("%s", arr);
	return 0;
}